package com.burt.mvc.controller;

import com.burt.framework.annotation.BurtController;
import com.burt.framework.annotation.BurtRequestMapping;
import com.burt.framework.annotation.BurtRequestParam;
import com.burt.framework.annotation.BurtResponseBody;
import com.burt.framework.servlet.BurtModelAndView;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Description:
 * User: Burt
 * Date: 2017-06-25
 * Time: 12:10
 */
@BurtController
@BurtRequestMapping("/web")
public class TestController {

    @BurtRequestMapping("/test")
    @BurtResponseBody
    public BurtModelAndView test(HttpServletRequest req, HttpServletResponse resp, @BurtRequestParam(value = "name") String name){
        String ss = "hello " + name + " , this is BurtSpringMvc";
        BurtModelAndView mv = new BurtModelAndView();
        Map<String, Object> result = new HashMap<String, Object>();
        result.put("tip",ss);
        mv.setModel(result);
        return mv;
    }
}
